import BusOrder from '@/pages/order/BusOrder';
import CcOrder from '@/pages/order/CcOrder';
import ScOrder from '@/pages/order/ScOrder';
import React from 'react';

interface IOrdersProps {
  /**
   * 订单类型： 1 - 包车； 2 - 专线； 3 - 巴士
   */
  orderType: number;
  /**
   * 订单过滤条件
   */
  filter?: any;
  /**
   * 是否隐藏动作按钮
   */
  hideActions?: boolean;
  /**
   * 指定隐藏的搜索项
   */
  hiddenSearchItems?: string[];

}

export default function Orders({ orderType, filter, hideActions = true, hiddenSearchItems = [] }: IOrdersProps) {
  return (
    <>
      {orderType === 1 && <CcOrder filter={filter} hideActions={hideActions} hiddenSearchItems={hiddenSearchItems} />}
      {orderType === 2 && <ScOrder filter={filter} hideActions={hideActions} hiddenSearchItems={hiddenSearchItems} />}
      {orderType === 3 && <BusOrder filter={filter} hideActions={hideActions} hiddenSearchItems={hiddenSearchItems} />}
    </>
  );
}
